<template>
    <div class="movieItem">
        <div class="left">
            <img :src="mitem.img.replace('w.h','128.180')" alt="">
        </div>
        <div class="center">
            <div class="m_title">{{mitem.nm}}</div>
            <div class="m_score" v-if="mitem.globalReleased==true">评分： <span> {{mitem.sc}}</span></div>
            <div class="m_score" v-if="mitem.globalReleased==false"><span>{{mitem.wish}}</span>人想看</div>            
            <div class="">主演: {{mitem.star}}</div>
            <div class="">{{mitem.showInfo}}</div>
        </div>
        <div class="right">
            <button class="btnBuy" v-if="mitem.globalReleased==true">购票</button>
            <button class="btnPre" v-if="mitem.globalReleased==false">预售</button>
        </div>
    </div>
</template>

<script>
    export default {
        name:"movieItem",
        props:["mitem"]
    }
</script>

<style lang="scss" scoped>
@import '../assets/css/comm.scss';
.movieItem{
    border-bottom: 1px solid lightgray;
    @include flexbox();
    box-sizing: border-box;
    padding: .1rem;
    >.left{
        width: 1.28rem;
        img{
            width:100%;
            display: block;   /*解决图片下在多余的部分*/
        }
    }
    .center{
        flex: 1;
        color: gray;
        font-size: .24rem;
        margin-left: .1rem;
        margin-right: .1rem;
        >*{
            font-size: inherit;
        }
        .m_title{
            font-size: 18px;
            font-weight: bold;
            color: #000000;
        }
        .m_score{
            span{
                color: orange;
                font-size: inherit;
            }
        }
    }
    .right{
        width:1.8rem;
        @include flexbox();
        justify-content: center;
        align-items: center;
        .btnBuy{
            width:1.2rem;
            height: .6rem;
            background-color: $primaryColor;
            border: none;
            color: #ffffff;
            border-radius: .1rem;
            font-size: .24rem;
        }
        .btnPre{
            @extend .btnBuy;
            background-color: #3c9fe6;   
        }
    }

}
</style>